#ifndef SEARCHUSERRESPONSEMESSAGE_H
#define SEARCHUSERRESPONSEMESSAGE_H

#include "./entities/message/superClass/message.h"

/*
Json数据格式
{
    "messageType": [SearchUserResponse](int)
    "status": ["success", "failure"](string)
    "reason": ["verified pass", "not found userId"](string)
    "userId": [userId](string)
    "nickname": [nickname](string)
}
*/
class SearchUserResponseMessage : public Message
{
public:
    SearchUserResponseMessage() = delete;

    SearchUserResponseMessage(const Status& status, const Reason& reason, const UserId& userId, const Nickname& nickname);
    SearchUserResponseMessage(const QJsonObject&);
    QJsonObject PackJsonData() const override;
    Status getStatus() const;
    Reason getReason() const;
    UserId getUserId() const;
    Nickname getNickname() const;

private:
    Status m_status;
    Reason m_reason;
    UserId m_userId;
    Nickname m_nickname;
};

// 编译时注册
Q_DECLARE_METATYPE(SearchUserResponseMessage)

#endif // SEARCHUSERRESPONSEMESSAGE_H
